package com.wei;

import java.util.HashMap;
import java.util.Map;

public class PrototypePatternTest {
    public static void main(String[] args) {
        String name = "张三";
        int id = 1;
        Map<String, Double> map = new HashMap<String, Double>();
        map.put("李四", 99.9);
        ConcretePrototype concretePrototype = new ConcretePrototype(id, name, map);
        ConcretePrototype concretePrototype1 = (ConcretePrototype) concretePrototype.clone();
        ConcretePrototype concretePrototype2 = (ConcretePrototype) concretePrototype.clone();
        concretePrototype1.show();
        concretePrototype2.show();
    }
}
